<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: Real number</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Real number<div class="ingroups"><a class="el" href="group__contractdev.html">Smart Contract API Reference</a> &raquo; <a class="el" href="group__mathapi.html">Math API</a> &raquo; <a class="el" href="group__mathcppapi.html">Math C++ API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Real number data type with basic operators. Wrap double class of Math C API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeosio_1_1real.html">eosio::real</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2880b7e268a82817fa784ddb1eb1b0dc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#ga2880b7e268a82817fa784ddb1eb1b0dc">eosio::operator==</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c1, const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c2)</td></tr>
<tr class="memdesc:ga2880b7e268a82817fa784ddb1eb1b0dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two double variables c1 and c2.  <a href="group__real.html#ga2880b7e268a82817fa784ddb1eb1b0dc">More...</a><br /></td></tr>
<tr class="separator:ga2880b7e268a82817fa784ddb1eb1b0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ed6283fa49bfcbc7b0e647bdc1fb40e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#ga9ed6283fa49bfcbc7b0e647bdc1fb40e">eosio::operator&gt;</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c1, const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c2)</td></tr>
<tr class="memdesc:ga9ed6283fa49bfcbc7b0e647bdc1fb40e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two double variables c1 and c2.  <a href="group__real.html#ga9ed6283fa49bfcbc7b0e647bdc1fb40e">More...</a><br /></td></tr>
<tr class="separator:ga9ed6283fa49bfcbc7b0e647bdc1fb40e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb6d45ce401771fd1a03f0f2a03d4726"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#gafb6d45ce401771fd1a03f0f2a03d4726">eosio::operator&lt;</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c1, const <a class="el" href="classeosio_1_1real.html">real</a> &amp;c2)</td></tr>
<tr class="memdesc:gafb6d45ce401771fd1a03f0f2a03d4726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two double variables c1 and c2.  <a href="group__real.html#gafb6d45ce401771fd1a03f0f2a03d4726">More...</a><br /></td></tr>
<tr class="separator:gafb6d45ce401771fd1a03f0f2a03d4726"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68cd8e0f235479aba3ac8d2079172c25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeosio_1_1real.html">real</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#ga68cd8e0f235479aba3ac8d2079172c25">eosio::real::operator+</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;rhs) const</td></tr>
<tr class="memdesc:ga68cd8e0f235479aba3ac8d2079172c25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add two real variables.  <a href="#ga68cd8e0f235479aba3ac8d2079172c25">More...</a><br /></td></tr>
<tr class="separator:ga68cd8e0f235479aba3ac8d2079172c25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6c5c07225c48b3dce21538f62d7be277"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeosio_1_1real.html">real</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#ga6c5c07225c48b3dce21538f62d7be277">eosio::real::operator*</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;rhs) const</td></tr>
<tr class="memdesc:ga6c5c07225c48b3dce21538f62d7be277"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply two real variables.  <a href="#ga6c5c07225c48b3dce21538f62d7be277">More...</a><br /></td></tr>
<tr class="separator:ga6c5c07225c48b3dce21538f62d7be277"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga064fdac1b4799429680ff50ebf690d38"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeosio_1_1real.html">real</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__real.html#ga064fdac1b4799429680ff50ebf690d38">eosio::real::operator/</a> (const <a class="el" href="classeosio_1_1real.html">real</a> &amp;rhs) const</td></tr>
<tr class="memdesc:ga064fdac1b4799429680ff50ebf690d38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Division between two real variables.  <a href="#ga064fdac1b4799429680ff50ebf690d38">More...</a><br /></td></tr>
<tr class="separator:ga064fdac1b4799429680ff50ebf690d38"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Example: </p><div class="fragment"><div class="line">real a(100);</div><div class="line">real b(10);</div><div class="line">real c = a+b</div><div class="line">real d = a / b</div><div class="line">real e = a*b</div><div class="line"><span class="keywordflow">if</span>(a == b) {}</div><div class="line"><span class="keywordflow">if</span>(a &gt; b) {}</div><div class="line"><span class="keywordflow">if</span>(a &lt; b) {}</div><div class="line"><span class="keyword">auto</span> val = d.value();</div></div><!-- fragment --> <h2 class="groupheader">Function Documentation</h2>
<a id="ga6c5c07225c48b3dce21538f62d7be277"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6c5c07225c48b3dce21538f62d7be277">&#9670;&nbsp;</a></span>operator*()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classeosio_1_1real.html">real</a> eosio::real::operator* </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Multiply two real variables </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>double variable to be multiplied with this </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result after multiplication </dd></dl>

</div>
</div>
<a id="ga68cd8e0f235479aba3ac8d2079172c25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga68cd8e0f235479aba3ac8d2079172c25">&#9670;&nbsp;</a></span>operator+()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classeosio_1_1real.html">real</a> eosio::real::operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add two real variables </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>double variable to be added with this </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the sum of this and rhs </dd></dl>

</div>
</div>
<a id="ga064fdac1b4799429680ff50ebf690d38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga064fdac1b4799429680ff50ebf690d38">&#9670;&nbsp;</a></span>operator/()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classeosio_1_1real.html">real</a> eosio::real::operator/ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Division between two real variables </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>double variable to be multiplied with this </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result after division </dd></dl>

</div>
</div>
<a id="gafb6d45ce401771fd1a03f0f2a03d4726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafb6d45ce401771fd1a03f0f2a03d4726">&#9670;&nbsp;</a></span>operator<()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool eosio::operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compares two double variables c1 and c2 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c1</td><td></td></tr>
    <tr><td class="paramname">c2</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if c1 &lt; c2, return true, otherwise false </dd></dl>

</div>
</div>
<a id="ga2880b7e268a82817fa784ddb1eb1b0dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2880b7e268a82817fa784ddb1eb1b0dc">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool eosio::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compares two double variables c1 and c2 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c1</td><td></td></tr>
    <tr><td class="paramname">c2</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if c1 == c2, return true, otherwise false </dd></dl>

</div>
</div>
<a id="ga9ed6283fa49bfcbc7b0e647bdc1fb40e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ed6283fa49bfcbc7b0e647bdc1fb40e">&#9670;&nbsp;</a></span>operator>()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool eosio::operator&gt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classeosio_1_1real.html">real</a> &amp;&#160;</td>
          <td class="paramname"><em>c2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Compares two double variables c1 and c2 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c1</td><td></td></tr>
    <tr><td class="paramname">c2</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if c1 &gt; c2, return true, otherwise false </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
